var app = getApp()
var QQMapWX = require('../../utils/qqmap-wx-jssdk.js');
Page({
  data: {
    height:0,
    info:{}
  },
  onShareAppMessage: function (res) {
    let member_id = app.globalData.userInfo.member_id
    return {
      title: '成纪先锋微平台',
      path: '/pages/public/detail?inviter_id=' + member_id,
      success: function (res) {
        // 转发成功
      },
      fail: function (res) {
        // 转发失败
      }
    }
  },
  onLoad: function (options) {
    var that = this;
    console.log(wx.getStorageSync('rd_session'))
    
    wx.getSystemInfo({
      success: function (res) {
        console.log(res);
        that.setData({
           width: res.windowWidth-20,
           height:res.windowHeight })
      }
    })

    if(options.id){
      app.ajax("mp_detail", { rd_session: wx.getStorageSync('rd_session'), id: options.id }, (data, err) => {
        this.setData({
          info: data.data,
        })
      })
    }
  },

});